
@extends('layouts.head')
@section('title')
welcome
@endsection
@section('content')
<section class="content-header" id="content-header">
账户管理
</section>

<section class="content" id="content">





</section>
<script >
    var content =new Vue({
        el:'#content',
        data:{
            date:'<?php echo date('Y-m-d') ?>',
            addUserV:false,
            dateMore:'',
            searchWord:'',
            users:[],
            rules:[],
            countOfUsers:0,
            multipleSelection: [],
        },
        created:function(){      
              this.$http.get('/user/getAll').then((response) => {this.users=response.data; this.countOfUsers = this.users.length;console.log('users,success')},(response) =>{ }); 
              this.$http.get('/rules/getAll').then((response) => {this.rules=response.data; console.log('rules,success')},(response) =>{ }); 
               
        },
        computed: {
          datePage: function () {
              return this.countOfUsers / 20;
            }
        },
        methods:{
              search:function(){
                  console.log(this.searchWord);
                  this.$http.get('/user/search/'+this.searchWord).then((response) => {this.users=response.data; this.countOfUsers = this.users.length;console.log('word,users,success')},(response) =>{ console.log(response);}); 
                  
              } ,
              yesterday:function(){
                  console.log('yesterday');
              },
              tomorrow:function(){
                  console.log('tomorrow');
              },
              submitAddUser:function(){
                  console.log('submitAddUser');
              },
              cancelAddUser:function(){
                  console.log('cancelAddUser');
              },
              lookRow:function(val){
                  console.log(val);
              },
              editRow:function(val){
                  console.log(val);
              },
              delRow:function(val){
                  console.log(val);
              },
              goToPage:function(){

              },
              checkChange:function(rows){
                     if (rows) {
                        rows.forEach(row => {
                          this.$refs.multipleTable.toggleRowSelection(row);
                        });
                      } else {
                        this.$refs.multipleTable.clearSelection();
                      }
              }, 
            checkOne(val) {
              this.multipleSelection = val;
            },
         },

  });
</script>




@endsection

@section('pagejs')

@endsection

        




